From c5681dc8313c4158258498a27e372ba9593e0d6c Mon Sep 17 00:00:00 2001 From: WayofTime Date: Wed, 29 Jul 2015 08:23:01 -0400 Subject: [PATCH] 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[] villageBees; - - /** - * List of items that can induce swarming. Integer denotes x in 1000 chance. - */ - public static HashMap inducers = new HashMap(); - - /** - * 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 clss; - - EnumBeeChromosome(Class clss) { - this.clss = clss; - } - - @Override - public Class 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. - *
e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);
- */ - @Deprecated - public static ArrayList plainFlowers = new ArrayList(); - - /** - *
e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);
- */ - 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 getProductChances(); - - /** - * @return Map of possible specialities with the chance for drop each bee cycle. (0 - 1] - */ - Map 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 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 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 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 getIndividualTemplates(); - - /* MUTATIONS */ - @Override - Collection getMutations(boolean shuffle); - - /* GAME MODE */ - void resetBeekeepingMode(); - - ArrayList 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 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 getDrones(World world, int x, int y, int z, int fortune); - - Collection 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 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 clss; - - EnumTreeChromosome(Class clss) { - this.clss = clss; - } - - @Override - public Class 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 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[] 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 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 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 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 getTreekeepingModes(); - - ITreekeepingMode getTreekeepingMode(World world); - - ITreekeepingMode getTreekeepingMode(String name); - - void registerTreekeepingMode(ITreekeepingMode mode); - - void setTreekeepingMode(World world, String name); - - /* TEMPLATES */ - @Override - ArrayList getIndividualTemplates(); - - /* MUTATIONS */ - @Override - Collection 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 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 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 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 getRegisteredCircuits(); - - void registerCircuit(ICircuit circuit); - - ICircuit getCircuit(String uid); - - ICircuitLibrary getCircuitLibrary(World world, String playername); - - /* LAYOUTS */ - Map 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 isBiomeHellishCache = new HashMap(); - - /** - * 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 - */ -public class ErrorStateRegistry { - - private static final BiMap states = HashBiMap.create(); - private static final Map stateNames = new HashMap(); - private static final Set 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 :."); - 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 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 - */ -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> farmables = new HashMap>(); - - 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 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 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 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 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 collect(); - - boolean cultivate(int x, int y, int z, ForgeDirection direction, int extent); - - Collection 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 fermenterFuel; - /** - * Add new resources for the moistener here (i.e. wheat) - */ - public static HashMap moistenerResource; - /** - * Add new substrates for the rainmaker here - */ - public static HashMap rainSubstrate; - /** - * Add new fuels for EngineBronze (= biogas engine) here - */ - public static HashMap bronzeEngineFuel; - /** - * Add new fuels for EngineCopper (= peat-fired engine) here - */ - public static HashMap copperEngineFuel; - /** - * Add new fuels for Generator here - */ - public static HashMap 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 ersatzSpecimen = new HashMap(); - /** - * Translates plain saplings into genetic data. Used by the treealyzer and the farm to convert foreign saplings. - */ - public static HashMap ersatzSaplings = new HashMap(); - /** - * 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 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 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 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 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 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 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 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 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 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 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 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 { - - 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 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 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 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 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 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 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 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 getGenomeTemplates(); - ArrayList getIndividualTemplates(); - - /* MUTATIONS */ - /** - * Use to register mutations. - * - * @param mutation - */ - void registerMutation(IMutation mutation); - - /** - * @return All registered mutations. - */ - Collection getMutations(boolean shuffle); - - /** - * @param other Allele to match mutations against. - * @return All registered mutations the given allele is part of. - */ - Collection getCombinations(IAllele other); - - Collection getPaths(IAllele result, IChromosomeType chromosomeType); - - /* RESEARCH */ - /** - * @return List of generic catalysts which should be accepted for research by species of this class. - */ - Map 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 clss; - - EnumButterflyChromosome(Class clss) { - this.clss = clss; - } - - @Override - public Class 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 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 getButterflyLoot(); - - Map 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 getIndividualTemplates(); - - /* MUTATIONS */ - @Override - Collection 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 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 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 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 specifying the possible products and the chances of them resulting from centrifugation. - */ - public void addRecipe(int timePerItem, ItemStack resource, HashMap 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 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 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[] backpackItems; - - public static IBackpackInterface backpackInterface; - - /** - * Only use this if you know what you are doing. Prefer backpackInterface. - */ - public static HashMap definitions = new HashMap(); -} 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 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[] 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 entry); - - public void registerBlockTrackEntry(IBlockTrackEntry entry); - - public void addHackable(Class entityClazz, Class iHackable); - - public void addHackable(Block block, Class 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 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 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 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 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 renderOverrides = new HashMap(); - - 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 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 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 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 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 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 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 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 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 drillRecipes = new ArrayList(); - public static List laserRecipes = new ArrayList(); - public static List drillLaserRecipes = new ArrayList(); - - 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 chamberRecipes = new ArrayList(); - public static List specialRecipes = new ArrayList(); - - 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> 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 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 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 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 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 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 portableHoleBlackList = new ArrayList(); - - - //RESEARCH///////////////////////////////////////// - public static ArrayList scanEventhandlers = new ArrayList(); - public static ArrayList scanEntities = new ArrayList(); - 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.
For example the normal and wither skeleton: - *
ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 5)); - *
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 smeltingBonus = new HashMap(); - - /** - * 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 keyCache = new HashMap(); - - 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 objectTags = new ConcurrentHashMap(); - - /** - * 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:

- * ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.cobblestone), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1)); - * @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:

- * ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.cobblestone), new int[]{0,1}, (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1)); - * @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 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:

- * ThaumcraftApi.registerComplexObjectTag(new ItemStack(Blocks.cobblestone), (new AspectList()).add(Aspect.MECHANISM, 2).add(Aspect.MOTION, 4)); - * @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 warpMap = new HashMap(); - - /** - * 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) allAspects= new HashMap(); - private static HashMap allCompoundAspects= new HashMap(); - - 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 getPrimalAspects() { - ArrayList primals = new ArrayList(); - Collection pa = aspects.values(); - for (Aspect aspect:pa) { - if (aspect.isPrimal()) primals.add(aspect); - } - return primals; - } - - public static ArrayList getCompoundAspects() { - ArrayList compounds = new ArrayList(); - Collection 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 aspects = new LinkedHashMap(); - - //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 aspects = new LinkedHashMap();//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;a0) { - 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;a0 && 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 (amount0?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)catalyst).size()>0) { - ItemStack[] ores = ((ArrayList)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))catalyst).size()>0) { - ItemStack[] ores = ((ArrayList)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)catalyst).size()>0) { -// for (ItemStack s:(ArrayList)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 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 ii = new ArrayList(); - for (ItemStack is:input) { - ii.add(is.copy()); - } - - for (ItemStack comp:components) { - boolean b=false; - for (int a=0;a 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 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 ii = new ArrayList(); - for (ItemStack is:input) { - ii.add(is.copy()); - } - - for (ItemStack comp:getComponents()) { - boolean b=false; - for (int a=0;a 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 itemMap = new HashMap(); - - 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)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)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 researchCategories = new LinkedHashMap (); - - /** - * @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 research = new HashMap(); - - - - -} 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 parent = null; - ArrayList> children = new ArrayList>(); - - /** - * @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 n:getChildren()) { - if (n!=null && n.get()!=null) { - n.get().removeThisNode(); - } - } - - children = new ArrayList>(); - if (VisNetHandler.isNodeValid(this.getParent())) { - this.getParent().get().nodeRefresh=true; - } - this.setParent(null); - this.parentChanged(); - - if (this.isSource()) { - HashMap> sourcelist = VisNetHandler.sources.get(worldObj.provider.dimensionId); - if (sourcelist==null) { - sourcelist = new HashMap>(); - } - 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 getParent() { - return parent; - } - - /** - * @return - */ - public WeakReference getRootSource() { - return VisNetHandler.isNodeValid(getParent()) ? - getParent().get().getRootSource() : this.isSource() ? - new WeakReference(this) : null; - } - - /** - * @param parent - */ - public void setParent(WeakReference parent) { - this.parent = parent; - } - - /** - * @return - */ - public ArrayList> 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 n:children) { - if (n==null || n.get()==null) { - nodeRefresh=true; - break; - } - } - } - - //refresh linked nodes - if (nodeRefresh) { - for (WeakReference 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> nodes = nearbyNodes.get(drainer); - if (nodes!=null && nodes.size()>0) - for (WeakReference 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>> sources = new HashMap>>(); - - public static void addSource(World world, TileVisNode vs) { - HashMap> sourcelist = sources - .get(world.provider.dimensionId); - if (sourcelist == null) { - sourcelist = new HashMap>(); - } - sourcelist.put(vs.getLocation(), new WeakReference(vs)); - sources.put(world.provider.dimensionId, sourcelist); - nearbyNodes.clear(); - } - - public static boolean isNodeValid(WeakReference node) { - if (node == null || node.get() == null || node.get().isInvalid()) - return false; - return true; - } - - public static WeakReference addNode(World world, TileVisNode vn) { - WeakReference ref = new WeakReference(vn); - - HashMap> sourcelist = sources - .get(world.provider.dimensionId); - if (sourcelist == null) { - sourcelist = new HashMap>(); - return null; - } - - ArrayList nearby = new ArrayList(); - - for (WeakReference 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 findClosestNodes(TileVisNode target, - TileVisNode root, ArrayList in) { - TileVisNode closestChild = null; - - for (WeakReference 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>> nearbyNodes = new HashMap>>(); - - private static void calculateNearbyNodes(World world, int x, int y, int z) { - - HashMap> sourcelist = sources - .get(world.provider.dimensionId); - if (sourcelist == null) { - sourcelist = new HashMap>(); - return; - } - - ArrayList> cn = new ArrayList>(); - WorldCoordinates drainer = new WorldCoordinates(x, y, z, - world.provider.dimensionId); - - ArrayList nearby = new ArrayList(); - - for (WeakReference 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> children = new ArrayList>(); - children = getAllChildren(source,children); - - for (WeakReference 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> getAllChildren(TileVisNode source, ArrayList> list) { - for (WeakReference 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> - // noderef = new HashMap>(); - // - // 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 (dAs 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 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 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 caps = new LinkedHashMap(); - - 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 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 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 rods = new LinkedHashMap(); - - 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 triggers = new HashMap(); - - 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 . 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 categories = new ArrayList(); - private static List allEntries = new ArrayList(); - - public static Map knowledgeTypes = new HashMap(); - - public static List petalRecipes = new ArrayList(); - public static List runeAltarRecipes = new ArrayList(); - public static List manaInfusionRecipes = new ArrayList(); - public static List elvenTradeRecipes = new ArrayList(); - - private static BiMap> subTiles = HashBiMap.> create(); - public static Set subtilesForCreativeMenu = new LinkedHashSet(); - - public static Map oreWeights = new HashMap(); - - public static Map 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 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 getAllCategories() { - return categories; - } - - /** - * Gets all registered entries. - */ - public static List 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.
- * Alternatively get the values with the OreDetector mod:
- * 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 list = CraftingManager.getInstance().getRecipeList(); - return list.get(list.size() - 1); - } - - /** - * Gets the last x recipes added to the recipe list. - */ - public static List getLatestAddedRecipes(int x) { - List list = CraftingManager.getInstance().getRecipeList(); - List 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 getSubTileMapping(String key) { - if(!subTiles.containsKey(key)) - key = ""; - - return subTiles.get(key); - } - - public static String getSubTileStringMapping(Class 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 . 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 getAllCollectorsInWorld(World world) { - return new ArrayList(); - } - - @Override - public List 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 . 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 recipes) { - return dummyPage(key); - } - - @Override - public LexiconPage craftingRecipePage(String key, IRecipe recipe) { - return dummyPage(key); - } - - @Override - public LexiconPage petalRecipesPage(String key, List recipes) { - return dummyPage(key); - } - - @Override - public LexiconPage petalRecipePage(String key, RecipePetals recipe) { - return dummyPage(key); - } - - @Override - public LexiconPage runeRecipesPage(String key, List recipes) { - return dummyPage(key); - } - - @Override - public LexiconPage runeRecipePage(String key, RecipeRuneAltar recipe) { - return dummyPage(key); - } - - @Override - public LexiconPage manaInfusionRecipesPage(String key, List recipes) { - return dummyPage(key); - } - - @Override - public LexiconPage manaInfusionRecipePage(String key, RecipeManaInfusion recipe) { - return dummyPage(key); - } - - @Override - public LexiconPage elvenTradePage(String key, List 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 . 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 . 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 . 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 . 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 recipes); - - public LexiconPage craftingRecipePage(String key, IRecipe recipe); - - public LexiconPage petalRecipesPage(String key, List recipes); - - public LexiconPage petalRecipePage(String key, RecipePetals recipe); - - public LexiconPage runeRecipesPage(String key, List recipes); - - public LexiconPage runeRecipePage(String key, RecipeRuneAltar recipe); - - public LexiconPage manaInfusionRecipesPage(String key, List recipes); - - public LexiconPage manaInfusionRecipePage(String key, RecipeManaInfusion recipe); - - public LexiconPage elvenTradePage(String key, List 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 . 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 . 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.
- * A way of getting the dimension is via worldObj.provider.dimensionId
- * 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.
- * A way of getting the dimension is via worldObj.provider.dimensionId
- * 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 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 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 . 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 . 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 . 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 . 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...
- * - Case the item is armor, having it equipped.
- * - Case the item is a bauble, having it worn.
- * - 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 . 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 unlocalized 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 . 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 . 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 . 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 entries = new ArrayList(); - - /** - * @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 . 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 { - - public final String unlocalizedName; - public final LexiconCategory category; - - private KnowledgeType type = BotaniaAPI.basicKnowledge; - - public List pages = new ArrayList(); - 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 . 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 . 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 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 . 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 . 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 . 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 . 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.

- * - * 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.

- * - * 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 . 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 . 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 . 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 . 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 . 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.

- * - * Implementation Instructions:
- * - Override invalidate() and onChunkUnload(), calling ManaNetworkEvent.removeCollector(this); on both.
- * - On the first tick of onUpdate(), call ManaNetworkEvent.addCollector(this); - */ -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 . 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 . 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 . 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.
- * Mana Distributors will also accept it as valid output.

- * - * Implementation Instructions:
- * - Override invalidate() and onChunkUnload(), calling ManaNetworkEvent.removePool(this); on both.
- * - On the first tick of onUpdate(), call ManaNetworkEvent.addPool(this); - */ -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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 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 . 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 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.
- * 0: None
- * 1: Dispersive
- * 2: Dominant
- * 3: Recessive
- * 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 . 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 getSparksAround(World world, double x, double y, double z) { - return SparkHelper.getEntitiesAround(ISparkEntity.class, world, x, y, z); - } - - public static List getEntitiesAround(Class clazz, World world, double x, double y, double z) { - int r = SPARK_SCAN_RANGE; - List 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 . 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 inputs; - - public RecipeElvenTrade(ItemStack output, Object... inputs) { - this.output = output; - - List 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 stacks, boolean remove) { - List inputsMissing = new ArrayList(inputs); - List 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 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 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 . 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 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 . 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 inputs; - - public RecipePetals(ItemStack output, Object... inputs) { - this.output = output; - - List 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 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 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 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 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 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 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) component).isEmpty()) return; - GuiHelper.drawItemStack(((ArrayList) component).get(0), stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { - guiBase.renderToolTip(((ArrayList) 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) component).isEmpty()) return; - GuiHelper.drawItemStack(((ArrayList) component).get(0), stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { - guiBase.renderToolTip(((ArrayList) 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 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) component).isEmpty()) return; +// GuiHelper.drawItemStack(((ArrayList) component).get(0), stackX, stackY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { +// guiBase.renderToolTip(((ArrayList) 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) component).isEmpty()) return; +// GuiHelper.drawItemStack(((ArrayList) component).get(0), stackX, stackY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { +// guiBase.renderToolTip(((ArrayList) 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; hstructureLength) - structureLength = structure[h].length-1; - int perLvl=0; - for(int l=0; lstructureWidth) - 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=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=y+yy&&mouseYstructureLength) +// structureLength = structure[h].length-1; +// int perLvl=0; +// for(int l=0; lstructureWidth) +// 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=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=y+yy&&mouseY 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 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 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 items = APISpellHelper.getItemsFromBlock(world, localBlock, x, y, z, localMeta, this.getSilkTouch(stack), this.getFortuneLevel(stack)); + List items = APISpellHelper.getItemsFromBlock(world, pos, localBlock, localState, this.getSilkTouch(stack), this.getFortuneLevel(stack)); SpellParadigmTool parad = this.loadParadigmFromStack(stack); List 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 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 getItemsFromBlock(World world, Block block, int x, int y, int z, int meta, boolean silkTouch, int fortune) + public static List 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 items = new ArrayList(); - 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 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 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 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 list = new ArrayList(); // 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(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 orbs; - PositionedStack output; - List inputs; - int lp; - - public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) { - this(recipe); - this.orbs = new ArrayList(); - orbs.add(new BloodOrbs(orb)); - } - - public CachedAlchemyRecipe(AlchemyRecipe recipe) { - List inputs = new ArrayList(); - 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(); - for (Item orb : bloodOrbs) { - if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) { - orbs.add(new BloodOrbs(new ItemStack(orb))); - } - } - } - - @Override - public List 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 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 orbs; +// PositionedStack output; +// List inputs; +// int lp; +// +// public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) { +// this(recipe); +// this.orbs = new ArrayList(); +// orbs.add(new BloodOrbs(orb)); +// } +// +// public CachedAlchemyRecipe(AlchemyRecipe recipe) { +// List inputs = new ArrayList(); +// 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(); +// for (Item orb : bloodOrbs) { +// if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) { +// orbs.add(new BloodOrbs(new ItemStack(orb))); +// } +// } +// } +// +// @Override +// public List 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 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 handleTooltip(GuiRecipe gui, List 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 handleTooltip(GuiRecipe gui, List 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 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) 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) 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) 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 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) 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) 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) 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 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 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 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 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 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 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 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 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 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 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 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 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 bloodOrbs = new ArrayList(); - - @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 bloodOrbs = new ArrayList(); +// +// @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 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 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 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 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 craftinglist = new ArrayList(); - public final static List pickupList = new ArrayList(); - public final static List blockCraftingList = new ArrayList(); -// public final static List blockPickupList = new ArrayList(); + public final static List craftinglist = new ArrayList(); + public final static List 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 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 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 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 entries = new ArrayList(); - - ArrayList introPages = new ArrayList(); - introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.intro"))); - entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.architect.intro")); - - ArrayList 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 soulNetworkPages = new ArrayList(); - soulNetworkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulNetwork"))); - entries.add(new EntryUniText(soulNetworkPages, "guide.BloodMagic.entryName.architect.soulNetwork")); - - ArrayList 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 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 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 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 hellHarvestPages = new ArrayList(); - hellHarvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.hellHarvest"))); - entries.add(new EntryUniText(hellHarvestPages, "guide.BloodMagic.entryName.architect.hellHarvest")); - - ArrayList 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 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 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 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 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 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 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 advancedAltarPages = new ArrayList(); - advancedAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.advancedAltar"))); - entries.add(new EntryUniText(advancedAltarPages, "guide.BloodMagic.entryName.architect.advancedAltar")); - - ArrayList 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 soulFrayPages = new ArrayList(); - soulFrayPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulFray"))); - entries.add(new EntryUniText(soulFrayPages, "guide.BloodMagic.entryName.architect.soulFray")); - - ArrayList 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 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 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 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 fivePeoplePages = new ArrayList(); - fivePeoplePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fivePeople"))); - entries.add(new EntryUniText(fivePeoplePages, "guide.BloodMagic.entryName.architect.fivePeople")); - - ArrayList 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 fieldTripPages = new ArrayList(); - fieldTripPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fieldTrip"))); - entries.add(new EntryUniText(fieldTripPages, "guide.BloodMagic.entryName.architect.fieldTrip")); - - ArrayList 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 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 priceOfPowerPages = new ArrayList(); - priceOfPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.priceOfPower"))); - entries.add(new EntryUniText(priceOfPowerPages, "guide.BloodMagic.entryName.architect.priceOfPower")); - - ArrayList 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 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 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 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 demonProblemPages = new ArrayList(); - demonProblemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonProblem"))); - entries.add(new EntryUniText(demonProblemPages, "guide.BloodMagic.entryName.architect.demonProblem")); - - ArrayList 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 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 entries = new ArrayList(); - -// ArrayList testPages = new ArrayList(); -// testPages.add(PageRitualMultiBlock.getPageForRitual("AW031Convocation")); -// entries.add(new EntryUniText(testPages, "Test page")); - - - ArrayList introPages = new ArrayList(); - introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.intro"))); - entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.rituals.intro")); - - ArrayList 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 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 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 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 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 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 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 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 beastModePages = new ArrayList(); - beastModePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.beastMode"))); - entries.add(new EntryUniText(beastModePages, "guide.BloodMagic.entryName.rituals.beastMode")); - - ArrayList 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 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 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 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 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 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 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 darkMagicPages = new ArrayList(); - darkMagicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.darkMagic"))); - entries.add(new EntryUniText(darkMagicPages, "guide.BloodMagic.entryName.rituals.darkMagic")); - - ArrayList 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 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 harvestFestivalPages = new ArrayList(); - harvestFestivalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestFestival"))); - entries.add(new EntryUniText(harvestFestivalPages, "guide.BloodMagic.entryName.rituals.harvestFestival")); - - ArrayList thenThereWereFivePages = new ArrayList(); - thenThereWereFivePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.thenThereWereFive"))); - entries.add(new EntryUniText(thenThereWereFivePages, "guide.BloodMagic.entryName.rituals.thenThereWereFive")); - - ArrayList 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 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 awakenedCrystalPages = new ArrayList(); - awakenedCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.awakenedCrystal"))); - entries.add(new EntryUniText(awakenedCrystalPages, "guide.BloodMagic.entryName.rituals.awakenedCrystal")); - - ArrayList 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 conclaveOfMagesPages = new ArrayList(); - conclaveOfMagesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.conclaveOfMages"))); - entries.add(new EntryUniText(conclaveOfMagesPages, "guide.BloodMagic.entryName.rituals.conclaveOfMages")); - - ArrayList forbiddenParadisePages = new ArrayList(); - forbiddenParadisePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.forbiddenParadise"))); - entries.add(new EntryUniText(forbiddenParadisePages, "guide.BloodMagic.entryName.rituals.forbiddenParadise")); - - ArrayList 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 longHaulPages = new ArrayList(); - longHaulPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.longHaul"))); - entries.add(new EntryUniText(longHaulPages, "guide.BloodMagic.entryName.rituals.longHaul")); - - ArrayList 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 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 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 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 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 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 entries = new ArrayList(); - - ArrayList ashesPages = new ArrayList(); - ashesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.ashes"))); - entries.add(new EntryUniText(ashesPages, "guide.BloodMagic.entryName.demons.ashes")); - - ArrayList tamedDemonPages = new ArrayList(); - tamedDemonPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.tamedDemon"))); - entries.add(new EntryUniText(tamedDemonPages, "guide.BloodMagic.entryName.demons.tamedDemon")); - - ArrayList futurePages = new ArrayList(); - futurePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.future"))); - entries.add(new EntryUniText(futurePages, "guide.BloodMagic.entryName.demons.future")); - - ArrayList knightPages = new ArrayList(); - knightPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.knight"))); - entries.add(new EntryUniText(knightPages, "guide.BloodMagic.entryName.demons.knight")); - - ArrayList 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 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 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 futurePlansPages = new ArrayList(); - futurePlansPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.futurePlans"))); - entries.add(new EntryUniText(futurePlansPages, "guide.BloodMagic.entryName.demons.futurePlans")); - - ArrayList demonInvasionPages = new ArrayList(); - demonInvasionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonInvasion"))); - entries.add(new EntryUniText(demonInvasionPages, "guide.BloodMagic.entryName.demons.demonInvasion")); - - ArrayList 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 entries = new ArrayList(); - - ArrayList demonGirlPages = new ArrayList(); - demonGirlPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonGirl"))); - entries.add(new EntryUniText(demonGirlPages, "guide.BloodMagic.entryName.spells.demonGirl")); - - ArrayList 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 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 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 timePassesPages = new ArrayList(); - timePassesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.timePasses"))); - entries.add(new EntryUniText(timePassesPages, "guide.BloodMagic.entryName.spells.timePasses")); - - ArrayList 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 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 offTopicPages = new ArrayList(); - offTopicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.offTopic"))); - entries.add(new EntryUniText(offTopicPages, "guide.BloodMagic.entryName.spells.offTopic")); - - ArrayList 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 entries = new ArrayList(); - - ArrayList fatedMeetingPages = new ArrayList(); - fatedMeetingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.fatedMeeting"))); - entries.add(new EntryUniText(fatedMeetingPages, "guide.BloodMagic.entryName.alchemy.fatedMeeting")); - - ArrayList 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 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 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 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 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 newPotionsPages = new ArrayList(); - newPotionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.newPotions"))); - entries.add(new EntryUniText(newPotionsPages, "guide.BloodMagic.entryName.alchemy.newPotions")); - - ArrayList soulSandPages = new ArrayList(); - soulSandPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.soulSand"))); - entries.add(new EntryUniText(soulSandPages, "guide.BloodMagic.entryName.alchemy.soulSand")); - - ArrayList timeGoesByPages = new ArrayList(); - timeGoesByPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.timeGoesBy"))); - entries.add(new EntryUniText(timeGoesByPages, "guide.BloodMagic.entryName.alchemy.timeGoesBy")); - - ArrayList catalystsPages = new ArrayList(); - catalystsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.catalysts"))); - entries.add(new EntryUniText(catalystsPages, "guide.BloodMagic.entryName.alchemy.catalysts")); - - ArrayList activationCrystalPages = new ArrayList(); - activationCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.activationCrystal"))); - entries.add(new EntryUniText(activationCrystalPages, "guide.BloodMagic.entryName.alchemy.activationCrystal")); - - ArrayList 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 magusSecretPages = new ArrayList(); - magusSecretPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.magusSecret"))); - entries.add(new EntryUniText(magusSecretPages, "guide.BloodMagic.entryName.alchemy.magusSecret")); - - ArrayList 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 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 entries = new ArrayList(); +// +// ArrayList introPages = new ArrayList(); +// introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.intro"))); +// entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.architect.intro")); +// +// ArrayList 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 soulNetworkPages = new ArrayList(); +// soulNetworkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulNetwork"))); +// entries.add(new EntryUniText(soulNetworkPages, "guide.BloodMagic.entryName.architect.soulNetwork")); +// +// ArrayList 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 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 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 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 hellHarvestPages = new ArrayList(); +// hellHarvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.hellHarvest"))); +// entries.add(new EntryUniText(hellHarvestPages, "guide.BloodMagic.entryName.architect.hellHarvest")); +// +// ArrayList 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 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 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 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 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 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 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 advancedAltarPages = new ArrayList(); +// advancedAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.advancedAltar"))); +// entries.add(new EntryUniText(advancedAltarPages, "guide.BloodMagic.entryName.architect.advancedAltar")); +// +// ArrayList 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 soulFrayPages = new ArrayList(); +// soulFrayPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulFray"))); +// entries.add(new EntryUniText(soulFrayPages, "guide.BloodMagic.entryName.architect.soulFray")); +// +// ArrayList 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 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 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 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 fivePeoplePages = new ArrayList(); +// fivePeoplePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fivePeople"))); +// entries.add(new EntryUniText(fivePeoplePages, "guide.BloodMagic.entryName.architect.fivePeople")); +// +// ArrayList 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 fieldTripPages = new ArrayList(); +// fieldTripPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fieldTrip"))); +// entries.add(new EntryUniText(fieldTripPages, "guide.BloodMagic.entryName.architect.fieldTrip")); +// +// ArrayList 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 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 priceOfPowerPages = new ArrayList(); +// priceOfPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.priceOfPower"))); +// entries.add(new EntryUniText(priceOfPowerPages, "guide.BloodMagic.entryName.architect.priceOfPower")); +// +// ArrayList 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 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 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 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 demonProblemPages = new ArrayList(); +// demonProblemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonProblem"))); +// entries.add(new EntryUniText(demonProblemPages, "guide.BloodMagic.entryName.architect.demonProblem")); +// +// ArrayList 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 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 entries = new ArrayList(); +// +//// ArrayList testPages = new ArrayList(); +//// testPages.add(PageRitualMultiBlock.getPageForRitual("AW031Convocation")); +//// entries.add(new EntryUniText(testPages, "Test page")); +// +// +// ArrayList introPages = new ArrayList(); +// introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.intro"))); +// entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.rituals.intro")); +// +// ArrayList 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 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 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 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 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 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 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 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 beastModePages = new ArrayList(); +// beastModePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.beastMode"))); +// entries.add(new EntryUniText(beastModePages, "guide.BloodMagic.entryName.rituals.beastMode")); +// +// ArrayList 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 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 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 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 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 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 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 darkMagicPages = new ArrayList(); +// darkMagicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.darkMagic"))); +// entries.add(new EntryUniText(darkMagicPages, "guide.BloodMagic.entryName.rituals.darkMagic")); +// +// ArrayList 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 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 harvestFestivalPages = new ArrayList(); +// harvestFestivalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestFestival"))); +// entries.add(new EntryUniText(harvestFestivalPages, "guide.BloodMagic.entryName.rituals.harvestFestival")); +// +// ArrayList thenThereWereFivePages = new ArrayList(); +// thenThereWereFivePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.thenThereWereFive"))); +// entries.add(new EntryUniText(thenThereWereFivePages, "guide.BloodMagic.entryName.rituals.thenThereWereFive")); +// +// ArrayList 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 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 awakenedCrystalPages = new ArrayList(); +// awakenedCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.awakenedCrystal"))); +// entries.add(new EntryUniText(awakenedCrystalPages, "guide.BloodMagic.entryName.rituals.awakenedCrystal")); +// +// ArrayList 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 conclaveOfMagesPages = new ArrayList(); +// conclaveOfMagesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.conclaveOfMages"))); +// entries.add(new EntryUniText(conclaveOfMagesPages, "guide.BloodMagic.entryName.rituals.conclaveOfMages")); +// +// ArrayList forbiddenParadisePages = new ArrayList(); +// forbiddenParadisePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.forbiddenParadise"))); +// entries.add(new EntryUniText(forbiddenParadisePages, "guide.BloodMagic.entryName.rituals.forbiddenParadise")); +// +// ArrayList 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 longHaulPages = new ArrayList(); +// longHaulPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.longHaul"))); +// entries.add(new EntryUniText(longHaulPages, "guide.BloodMagic.entryName.rituals.longHaul")); +// +// ArrayList 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 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 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 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 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 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 entries = new ArrayList(); +// +// ArrayList ashesPages = new ArrayList(); +// ashesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.ashes"))); +// entries.add(new EntryUniText(ashesPages, "guide.BloodMagic.entryName.demons.ashes")); +// +// ArrayList tamedDemonPages = new ArrayList(); +// tamedDemonPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.tamedDemon"))); +// entries.add(new EntryUniText(tamedDemonPages, "guide.BloodMagic.entryName.demons.tamedDemon")); +// +// ArrayList futurePages = new ArrayList(); +// futurePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.future"))); +// entries.add(new EntryUniText(futurePages, "guide.BloodMagic.entryName.demons.future")); +// +// ArrayList knightPages = new ArrayList(); +// knightPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.knight"))); +// entries.add(new EntryUniText(knightPages, "guide.BloodMagic.entryName.demons.knight")); +// +// ArrayList 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 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 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 futurePlansPages = new ArrayList(); +// futurePlansPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.futurePlans"))); +// entries.add(new EntryUniText(futurePlansPages, "guide.BloodMagic.entryName.demons.futurePlans")); +// +// ArrayList demonInvasionPages = new ArrayList(); +// demonInvasionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonInvasion"))); +// entries.add(new EntryUniText(demonInvasionPages, "guide.BloodMagic.entryName.demons.demonInvasion")); +// +// ArrayList 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 entries = new ArrayList(); +// +// ArrayList demonGirlPages = new ArrayList(); +// demonGirlPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonGirl"))); +// entries.add(new EntryUniText(demonGirlPages, "guide.BloodMagic.entryName.spells.demonGirl")); +// +// ArrayList 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 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 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 timePassesPages = new ArrayList(); +// timePassesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.timePasses"))); +// entries.add(new EntryUniText(timePassesPages, "guide.BloodMagic.entryName.spells.timePasses")); +// +// ArrayList 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 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 offTopicPages = new ArrayList(); +// offTopicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.offTopic"))); +// entries.add(new EntryUniText(offTopicPages, "guide.BloodMagic.entryName.spells.offTopic")); +// +// ArrayList 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 entries = new ArrayList(); +// +// ArrayList fatedMeetingPages = new ArrayList(); +// fatedMeetingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.fatedMeeting"))); +// entries.add(new EntryUniText(fatedMeetingPages, "guide.BloodMagic.entryName.alchemy.fatedMeeting")); +// +// ArrayList 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 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 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 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 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 newPotionsPages = new ArrayList(); +// newPotionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.newPotions"))); +// entries.add(new EntryUniText(newPotionsPages, "guide.BloodMagic.entryName.alchemy.newPotions")); +// +// ArrayList soulSandPages = new ArrayList(); +// soulSandPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.soulSand"))); +// entries.add(new EntryUniText(soulSandPages, "guide.BloodMagic.entryName.alchemy.soulSand")); +// +// ArrayList timeGoesByPages = new ArrayList(); +// timeGoesByPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.timeGoesBy"))); +// entries.add(new EntryUniText(timeGoesByPages, "guide.BloodMagic.entryName.alchemy.timeGoesBy")); +// +// ArrayList catalystsPages = new ArrayList(); +// catalystsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.catalysts"))); +// entries.add(new EntryUniText(catalystsPages, "guide.BloodMagic.entryName.alchemy.catalysts")); +// +// ArrayList activationCrystalPages = new ArrayList(); +// activationCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.activationCrystal"))); +// entries.add(new EntryUniText(activationCrystalPages, "guide.BloodMagic.entryName.alchemy.activationCrystal")); +// +// ArrayList 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 magusSecretPages = new ArrayList(); +// magusSecretPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.magusSecret"))); +// entries.add(new EntryUniText(magusSecretPages, "guide.BloodMagic.entryName.alchemy.magusSecret")); +// +// ArrayList 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 getGriddedPositions(ForgeDirection dir) + public List getGriddedPositions(EnumFacing dir) { List 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 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 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 directions = this.findValidExtentionDirection(x, z); + List 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 findValidExtentionDirection(int x, int z) + public List findValidExtentionDirection(int x, int z) { - List directions = new LinkedList(); + List 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 directions = new ArrayList(); + List 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> schemMap = new HashMap(); + HashMap> 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 directions = new ArrayList(); + List 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> schemMap = new HashMap(); + HashMap> 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 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 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 list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); + List 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 list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); + List 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 list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); + List 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 ritualList = Rituals.getRitualList(ritualName); + List 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 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 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 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 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 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 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 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 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 . 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 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 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 getRitualComponentList() - { - ArrayList 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 getRitualComponentList() +// { +// ArrayList 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 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 entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range)); + List 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 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 itemList = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(horizontalRadius, verticalRadius, horizontalRadius)); + List 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 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 entityList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List 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 entities = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y + 1, z, x + 1, y + 2, z + 1)); + List 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 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 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 list = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List 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 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 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 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 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 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 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 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 items = OreDictionary.getOres(dustName); - - if (items != null && items.size() >= 1) - { - return (items.get(0).copy()); - } - } + } return null; } - public static List 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 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 handleItemsOnBlockBroken(ItemStack toolStack, List 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 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 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 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 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 entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius); + List 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 itemList = SpellHelper.getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, vertRange, vertRange); + List 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 list = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 15, 15); + List 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 playerList = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, radius, radius); + List 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 destinationList; //These are offsets public Map> 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 <玩家> [数量] -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) z000W>0fLJSS^xk52XskIMF-vq8wfWf%>Qsr000FXNkl$sScnPQxk=7a_lv0Es7u$-0Kx;`56^c-*Aqc%-VpK|7jj<^UBud0s z6N%9TBhhCXo0!y6F5TVP*`3*)@nOqOO=h=!un7U0~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(?ffSyib5b5B^r_>kc9B~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`@BbX1+hj5s9LGUba}7+>L{StLE$(E|%p3x z9v=L5vA74{pDp4+<+e!=dWw7S@bjJdDefT;>RVk8dfSS7@X{{VgTYf%Jh;$3GY`&p zF~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) z000W>0fLJSS^xk52XskIMF-vq8wm>rYpx<;000HdNkle!L~$D>qE#ZNA*!oHsR)V)5rIUG3{g>|TCwOGh>A-5B_I&IAOV4rg3=p-CQWeK z6sS@qO{hsqOKD=uu3cZ_cz5oa`DpTB*&LW11$GWmBuwSXx>l3`5H0GODUFJw460 zP7V@?fESk&$x##mVB0olUim%0_|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|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 zt>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~2HZcXjuHNk( zJ$UbLe@`mhx2NyE2m7DgyDksDux~Gc2)MqSXq5*ew?5>ZcdxbeU~FQFD_7r3d$6l_ zd*VU=k;830*tX@NqrH#`wXb}6O%HbU?s(wAhI;V!U$3m`!6&2RX%BAw+;}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`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) z000W>0fLJSS^xk52XskIMF-vq8weu+-cm!!000GZNkl1gA7{~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 zqXM( zG(re2T=<8)>-s-Y(=51ZbK@G#X{Xgb66BLO$;@Y0`B>qgAMyh8_+BVB0nT`Fx(V zY2x7_gg_QTFfx+FFbn`hPN3^L!C-)huH)h1c^-(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+uh&!9nSx`vFJhDZ!MSQ!NL+2Z@1){O6nd)9g|YUi-6sTo0NCAG_wk74=}MI|J%p>s*S6sSM*?eTep99-sY!^9xU9}bXgv> zZf(L54m(DJ#(2>A(f}Ku|E8=5``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 z000W>0fLJSS^xk52XskIMF-vq8we~eg&b1J000D;Nkld*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_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+Dzd!S^#Z10kdTlh35udHG-RPD3Q-i{xju@bpqi$M>w2_WHc67uY_=G( zEF?)n*L7UiLy=`%*CmbTjTpKT*R_0)KbalY?Z1K z96Q40%gYqPfMQVxpxJCvE|*ahg~sGQs?{p;^&7o~QXR)(1lT@z4uIkPdx_(icDqfI zBp62LgD?!yG!6CiG_`ID+qRJoP3}u<+rhF-48x$+YV~4J|5I=O%D!tJph>P)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 z000W>0fLJSS^xk52XskIMF-vq8wfi!3i=GjsOLIX<*((oAN`gCsn#pI6q}d#|;AN_ADGACJcwH*OsL{rvz$A`ybY zAlYmdUDtVXLZJ|z=Mf5pa9tN61bQ$SP z6Q^bDg86gNpHx`9uom04DJv@@nY5{>s9PNaIC 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@5LkSGSptQ7G);oR01?x~$H(`5G)<$V#6r_Fa=9E%DvhRT=#fZ-RLUWdNaFiG z@pys~%R*5Ug25oEl!K 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>$>!yqM~BRgZ7StvT957`l23e+14s! z+qQ3g>cLk#TA#^-oo%hS!sYYfL?b-d-nNsCn>H8ppuOWDpMJI_--DLs_0ogy4t5mu zU{&J^*}l!2n)5w4uz&BU9<(%XccO0Ob)$N)ZsVqW4;q_ROAnSTZz$-&2Qy~LFpj!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 z000W>0fLJSS^xk52XskIMF-vq8wmsyACFJw000H&NklSrA@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_EmDl}hoIJ8uCX3`5r5^BHtqN7i*6 z&-0KZi6cQ?J*NXD?ksmSwb5 z3Qf}(C=M_?JBzBSgkgxGXK@^dd_Iq&D0rTSX&U%`yd_zYWgOQf3<6$!>5o(^RWg|j zwVFd1h6o`LLJ&nzEDrG2v40`SGLGZM0n+I-`wx7A5CVW-?fn~$FK&4V4m&>6j3J-4h0>xqxS-PAg zlxo{H0DJd+1boE!`Xz*6NWESsiXwD9p1}8gG)?2DKc7feVObW^`1*B`W!adffv)RR ztJP$H@B7IL`uqE_Z5zjNl9HdEo!C!X>37S)$kw$l(E=@yxHA@g{xx^)T3=Y$efy_ez3C#3*J9V_+}dq ztl_2y#f_akD1E8vLG84A2-UH9hG6 z-BlilMt{&h9($1T+k3!h(}Un@4^lwpEgNxV8 zgV}c{nQbg<@ru!|9{l~_8_5sj?hpJ_TMs^W@BIxA zkT%$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 z000W>0fLJSS^xk52XskIMF-vq8wfT9nT=6W000E8Nklj*J9OZJEIF2co%Y2pLzq+G?7iyBnSc|N#d24-otSmgb-|Q zZV|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{cL+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{^V zc^-uGEZivYz-X|zmFIz+@nC;}2VTYlHP3^)hVVe%^+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$~+E3bP0l+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`PlBg3pY5H=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)n#Kl` zORuIzV;d9FV8v9$DnedF{Ih%z@xhiB3vJU<;%TTMZ6eg5Nl;oefgWDai)=1 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#vyYG0)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 hjsE+~qC!#1-@@jnx{XE z)7O>#9;Y-9i`EU*3Cn;&vY8S|xv6<2KrRD=b5UwyNotBhd1gt5g1e`0K#E=} zJ4m6Yi(`nz>0}X6(b}U9j0s5#1bUMjXZV>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>t%NlKu zC}^#xws#?fb&iOLXn1SKT5F7HKUnIluCcYU*Xsc&4GajN_WVW4oMoB!-g_U0A%Lmv z-8|2&wE()^E?ucs-Pnccm-|N}Lm!6+vr8AT*@|nE?RJ|tHnYa9Z% 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& z_s%Yy7vR=VsWquf1%WO!ni%NWhJD?fpY_cQhV2ol*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!IjY2q?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{EIzYjGuldf8(>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?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$laSwHc97;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*LS#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=1GBtm)RO~Cx>YHJ%C8_kf7whx_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)fK2qR$zsQmKoc4_Z*r1RBV&Q^heHJX~5ws1Hp9eUEZ zJdMNM)ZXnA4_!Xkq0_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`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|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvNM%E>49G|SQvXv`K*7srr_TW{}dg 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 zcmcgu2Uk7(fxoAWe}bB@QAjgeD-;F5u|cU?>Tl0aQXj z1B!HsJbfkz2nqs9P*4m(0U4wX31u$K%v+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)^-GpPKOk zUpKDbIXwO(xWiG(u2}T87>o}rK^c7tyA#yKi$etv3?uOkx;` zi>IfcuZ)NsH4knGX~RB7U&+?vvC?-ah9SU;1ggPQ(tao{4e^o@^>I(QN2x$d z?3DM%v9jL&9_!1!xE6IDXPV*bs?nxrlQBVjBm}MtsP-Ogm(TpJm5#N|$~GHT#V1|=HLqYcfS#+uk6xwZ`}R4Px2rJ*sma zb}5u;Hk`LGBMzy`Ftxi)pNeQwK;!#aCPVz^*1_}cF(tA;zh~X|Dy5d_zJ92-IF^&6 z|6(FD@@^%UHo;d2ED)a0%es=B|LQRTmk2b}OTnMIN5k z4!z7pz7)!b(-*cQRXFl)CY5^87#qr7;WX2KIKJ;tsUw-&(qrn-QRf zQ?nN|_tH50i_I}hXQ%<)1r+k9*$a1@Cguw!ms;5ch|PLCAf$MVOZ|k z+-cpEVzYaIj~st`wgT5T_$`UU3_4h%5o91^pm0cC2NP_P0UzH_J74rX!I)+zD@%Nj zPo1c8|2oc??$Wbi4bYyL47nsO$%}>c_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(VO>~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+Mq$&Zv>^A#{a7cZ8J` z0u&XNc}pAzKxthBKwP90s1uPBkOp9z#;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 z8-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%V5QMIC<(oq}R2W76*hVG7mE*d!d?D^nc-I? z28$3fMKFL7_~$Dd&${7DjC;K#bz{xRQZutpv(k4P5&aPWX5(yx5{+BskCV`dwRZ#fmfE%Fzqq zlMZYX%6;m%0`g4tQSG;WF^uDFTH*~Hd%@_(_U!$){}}68WnCUk<== zXBhJOfS-6g_1MtxM%~HDD@g$F8%802n1O>Xo49jAA{q@ey$M?*DGR-Q@tBKI0(@U5 z92m?s$Whss`~Fh(ZXB`bDA^hb>-G?#>!aP|qdff)$5JL-9*-|hZfyCxVXa?s{$H3` z6McWwJqMkltFmv3Z3As^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&Xy>=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*i8fOi53gh`-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=|SSCC#1Uf(e(&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=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@ZvxeNZD$`x0jYeqV-=1^k1V*DxPaPkUD z_ST>3-`PE&xeWRy0@%H;0n=pY6epl&PTNKm9TdWtU7&DrbxOocK7Nhy+Aw%-XD+&j zpGgvoVc4g&0x5K@w6rucg!J=zy_nG)$ub8-O3$XkvG98heSx!dN)_Xcd(28mrB<}39zf=);?qV zjUPw!UMKRcOTdgu2p!YTGkMi3KCRyaK>CYduZh4O#?$BR#H#{XRf^>suqL{Xh zg6Kc{ECxfSZ8S(1#etKKP@rp5ELqi`K0a;LSH=r@XV`D-CcXnN32{sD8W)*l+Z)S% z^6ykqgTE!)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>4g;fnpr5QCZ~(HmV~-- ztO{+E%}N(KVNksNev*)L9Ds6X744=dK}wEtJz1!RX`ePtqe67<9wWQgq_ 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 zNU+pHZ~G8aGiEz~+)+Csp9C%0&KBHulid0N#ajilzu`pOhLBKkDAVaokseuZ&B+Av zzc)D956JhnoT!mHpbG|CxkQ8EJz){<N(EGSdOqB0FnhV&jQ?@p z0R0yU6Ny?ECH{=-c(?Z=*uHstUbI4LKafKqZXnxH+Xpn35P`I$3pD&%(FA6pIgXMw z+HQ7oI#r{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>L(p$al^bjw z-&du`pnyBSKv)JW%cju7T-WfXgoLkXw9vuxv{aHq4k5AYsi%v*6)n-*2w&&v_F?7q zIF2?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(sk;`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$J}1j^zRj*5KFAHKbnS7PIlcrH0KU7GPN) zOlGS;2%CI@5Gy$g>u^fSaBRkIyT~`?f6ua^+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+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-osROUJv*D97T9)@rIua!{-pE(3^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(|P5y0}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;8M;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%vgjx52QNGalAvB23TwxxlVl?yb>5YT~< zq2p{P2B;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@xfI-wUP%zZt^T#is$ z$4}!QuMFtkayLGywA0W4kg!S|qTi4>SmG!6CKW>IcPCo-CmBk<01SscEN~4MrdPqx zSII_`tmlW>m#goUL6HdIsXOlXMn(>vm`^v7lavnk5Lu)fCik+R#e;TTk@2)KR1uG}Yjq$yv5vfk;? z`r*#W*>uC~mwDqbxM1HYtE7SCSW_7N;*!PtU}tK;r52#>f*(j-iNk$d7}(<#EA)JgzjU=j>y2zvAXxWoqu%j;hH+$% z?5mBjiRwB9;jqR!nx9YJiUlRSO2B#*%p{fPscrqO#x*)&ur$xy9HTI+ic< z8ApGBss6+V{yY=bRd=-l^??cj$l;4<0hx1#rn;em`WJLcHz{GRBn?v}yApTRRm1Q94 z--yOp-Z$;npu9_xrqj&hO{}KVYkH^RQ3t|aKcI&*iaP?o(`PP;4Vm4y^qs=yxoCVdw^kxx32 zr___aQraHX(UJEjwdIF#a#dNi6MfubzeV0n>Ad@onyCCEHF5G^BJfY1AZ{6!zZ(0Q zx`k&!&OP!waVgHT>-6`3JA~s$3qojohEm7>++CyD+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>nLP1ygXfMV^QDjj_Z z53x8{SKIy6_O@AIznuSC`&ao$Ec1t8aDM3ic~$uMgKnFQ{ptADu+Ag)Jj4SIz(0zO9pwK}*;-Q0T5`UJ;Q6d2eChija&vxy zSKZcTArBcV1(_q&&SoEk@5^)d-~AUyT;n^F4ibDBF=R_u>gDUyLkN<>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>}egAxQ=;zI|$6h0fnR8R~% zMbE+mr<8w_-BcjBgAg)B=U8x2GPvA}dZj@7zqG#MjCY$#~aff)xkHEtt!O zKh7y)JOYyT8pwHiO)SkQV}=7H8-)z7jcefKs^kyk8O3s?Va5!;fUCDL^6F%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6^dDE`IM#WBR<^wLQi`I-y_+Wuc|kr3}-X4YG_?gQH%;q^)4 z@jXXf&150z@$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`PlBg3pY5H=O_IsRCe7xeXwqN-Q6guhY;uvCa`sn11Tug>MZTn9Z z%Di~?PN$=wTc(z2{(+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)%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|@`qBozY|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==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 zcmV3hM!aiw#-;000McNliru-U%BACJE7{NEHA80f0$F zK~z}7?Upfa!!Qg*zl@{^gu323dDfEKc^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 zQBJZJ_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*;fc3hM!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)CHlJ(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#}00004nJ@ErzW#^d=bQhN_vlu0WbcEP)%9xng@010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%8FI6HV4#Q6XK0bNN% zK~z}7?Uuhz!!QuWKU-B*ONfyP9sp(V>i1!0?;~XI%=>utVDSKDVnmf%vA|+i#+=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{nu|q_}$@l z=o~a2%*g|n1?p>f!1=n-Jdm7?YdmN?SO5=JrH!N3S#f#b3KiE29P<2z|fn~JK&dLMB5Eu>*Ec5=wE*Pe7x3hM!aiw#-;000McNliru-U%BADIsHs{2%}T0fR|I zK~z}7?Uu1>!!Qtrf0&f==D}a`Kq=)MJRXnZc@UG`WF8bT8<%;Ic`ySWEVzve zt#fD^gFNuXevrBFfNNsZD;Q&Xh-MyS9!%x|O{2Za(flra*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 zcmV3hM!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@qVNb5MBjmprIzKXA3Wg9jPVMZ_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)WFU8GbZ8()Nlj2>E@cM*00GQNL_t(I%bk<4YE(fK zhQBj&XYP7;VCJ2h^;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~@2591xWrQ$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;MT0000lTT|CK^Vq=@668Z8go>z#rh{8iWH$G zdJqxRgXm}Rrn6e=jii`tYP>O}=>iArxFn@x6i=Jk+nG&TzLIlcqGd7kH;5mg0X z_i^rl?CPVF1CAkS0Nu4UwbtUCV_X!dDk1_R0KDt<)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^y002ovPDHLkV1g2k{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-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|EF=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+zmF|>fTn&waWCoL*T;bWHrn>_t%31ub|#knxbr}VcKYRGd%hPih~F0p zz6!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@PfayJJLRU>sh|+KQ{mX|AMEB$ziJmX7r7t@m8G^s-jXs>}q^cCPO+f0xvfHmqv|L z1dbHe90r+Ajl8zO6|Gz21I|^+ZjqV}0hp5TCQDxzO9k`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*A-^CNqDu{uih!a6b{TT;-^<}vGqsCrXNAtX?U$)FXo$8c5 zwNzjn|Ah9Krg%p%1BqT(N2y+9?CDp2`0&zxlIgcl0neW3#R3h=D}}L+KCu2xVAoJ3>Z0dyO3( z`_i@U*n&@W#QNfHgtqX|!*^E{gqlcns|wq2c4Q~jWjm@5t9U2*dR91aj)nYh*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@XV`{PQrTiCk>{;LA8aP}2%g^PB>a{^+lo6=}WjppeKF^7nV zbbOKrVpO*14otMKI^76PykHZEo4G&B&C5*jBTjALuD(t&6=COOuabc>spx9{IUVmm zQD5;UWA=578oiWy7QZS2GJ6|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<t}+z(`(p>-Z7+(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!BWQZ81MdK#bTG7>xS)NG_^2ru|k~V9{okMZB8<#!Uh+dZN7dObNISrJsRB|mJ{0K%oD_z z3foxz%0K@oHTyRWoe|dXX|nFTSw!CzDBupm6+QYQap%XxqghP*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(#waRj@oJ3vSM;W zM4u(xU>R2`*@$)OXCu2)7BbZh9pV}I>hFCNn?(<1kH*(ReUEXcse3G?2R2mW-DmW` zkj3Al-KoFFr%N)H*jZJONR&?QnH!5S!0$JIE|H`bGovV4clcnSq6&-KZa z>#Pl}Dayz;;=Z2FgdjiQ^jQ_Tbo|ztLGZ(VXB7O9`0f%*_I5&7Zk3jsYI*4Xl#;ET zkyM?OL=aXHW?L9(YYDrED^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%XkoC*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}~6E{U3QvwQKoiE*3R2`@6fy!_8U zdT0ZTKK^9wY`%7}oy!ASq~lWtT1RQ2!0M` z@ypqDd(cTycuijt8VX@53=M%2BBAkI!UDH5Tr%G;w7Px+mw=OQZftt_kGJpv;~~*6 zjuVb0N56F5Ct_tzXu?p8x{g2hv0v<3N*~OP?LzE;XHx-!Ds#rd+5?YXw#dBREyr$qOObj6+mY7i#eBH{r!*4 z&Hiz=3^Fmq@q3|#5%-B*=5*VThpu#;##Y07q~F{sE0E$iRjYDbPS< zfIJk;56-TSzX^-~a3I-GLS2ghshEcnW)jvlpMQ#QIw`jcA<5IJc^a_#tzXF{=^FNa zBubf5`gUzQWZ8dx_4hx9P36(>$^F|OHncOOB$?gy0%6oLU5n-gGGEvJgr|JY)3CUm zz9BUSLJym6fC)q1aA$As0{Ip(+ zA}!>XL3Ma!`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%@!cAgpdT^aB9o%5pNrej9V0igK)EniX!=r3IZ10Q9ZOG~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|gg0QRn3H_QtZyWZS+c@si?B|q zybj{r)B;|fJaZ$rs5GsqG_$ERntK3yC1RK~`bpuJFvI8pE2XhAjo~s`_fQ_cVzYtW zyR<^BcYR;7O2_Fndw>H$yfK{+gc9uY3=~~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$jsDie^HN#p1!S9oc`s50ic;W{G_ZbvE%QJK!Z25o(DGkH3QI8097d~zrf4J-aAci8 za`UNa>2o`|@>g9<9?=22WkvECv7pS0R|9W4gdjHt9TkQ=-!SSj9%9pMxJtBzLFagRN}(@G|Js9226L4Nr-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|;=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^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)#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$%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-&DuGaBZ5$Y@7V%qilD_kvV} z4F%cAh~R=KpYFW{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!kXgs4f 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*W8Y92EJb)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 zIsMLpu7{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*YcyOs1IkZ3mcEs5)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{rA4ntTx z^$B4Q)tISzSZ}K+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* zc6zMAsJ5PV*b&};-dx&R0nGEe`BdR&W` z>m$LJk(Q{mXF%3Ac?=`17W(XwZa8`eAxQt!)ELBqNLI&eXI}@E% z%+pF{?_YoU{Y#V49rAOUutV93*Bw|of*A48F(#wn>7$5FF(`I?%F2@GC9^FlBLR~z z+d_>fd1O(tR4IfZ7urVCHnPD{W0R1<&< zv@ks_L`Jej{bEU;b@U>lQz_UYB-!Lg%tBg1d9AjwnNYg7nTH@3b zOwN)YQnX5f5S@rA1gT;Ey&^yN)i`B6T>87oaA_$im#W8A6taW6Mn&+Dd^!@lyI6Fj z4@yhKs(UiTatFcE;+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#9lcl57r23KYRK8OOrk( z8JCbY*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 zHl4KQB^N{RNKPhl z1fvgwSo-@^PC|OdWi*sbD#{Chf9t;I$^yF9^D72`r%RN;zx=imp@t$ooBu9B9l^dQUB$aCwovHs{`2{&?vS)Rw!Jzy&t zltVrjkE1FLHzA9e9A|0R%JJ5{#9Pbfko>^4tvKWOMp%_7aXaXmX8Go|Kl!JR+7v8rt>P1>^B;wGE7Q`mj*GhW#=sc5e_v?TB$)(XR(?2Ks zhms*~jz_JZj>UDPb?s%4BcvE>S7;6CxtkNelD8zHu_+ zjeOaLBad1fViEb*o{vA~F>Xp44x~9#p1INVAfOgQV zFhW`i>Uh|#!w8(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`0ra+y^D;vOuM;M=mPzbq? z(dQf+lFB#qSw%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{II2Zre1Smff^ 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>M@h_dc)7yBNWnm0 zOrTP-O$tq2|ZatKJ69QR;8ynwAx-0p%1b^Qeyh*kw+E}IRdxTly zEMzGx_?-uC%F}s+=KT;6wQf4DTzV1Q8rP-ilV7GvT!tX3^~dWXo$;BM*TC${-socBCl32oWgheKyFZnzwLB%gVuf2e?^_(TQ|I zI$vq3GjKy6Dgtg~f48gc>gINivQ$wzgRsaw_(%@_@dx{D-# z$AQ2~%>?oqqjATbVKov1? zVIqCZ5rQ9;A(m12by)%M0Zc|ask$HhsOyR~{HW2VOI+lZ{$xri13ATkWGGm~SnDS^ zgkEJB3nORor({5@d z!8GWGmIPVEGzeQoHY7CA)?p1j5j>dbRhL*pcPgW%)bAN%RMI7Z`y)82c$QMIc?h=} zgeZhnO)CoX98cC|+C$d=Bu9kVu~bc$ZQxg zj0qpBWM5f9o<=1zB=GH9jE?gJ%9jX5Ar?lFwGGj711_oc_$Rm_ZT4VfQNDS?4F*-t zQ!k77*W7|%Wu1RyYl+eG^fHGGO*>^ALp|C18s#}LhP6?~N;%eyM!!>e44YmpW}(38w20Husrbcnz_>*$UWAN5KH6$>2a|&| zEO|2Iqa=B$bFuC$GD&`J^wg!;uRKD~a#okIb)e^Oa~Wqx64{}dd1PFv2pJuVH 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#qzI4{34OrhtY;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*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#j00?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|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((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%ZeM~Zze3^B|5+O&DvCs=9U0^!O2uIA} z!3iw`Ig^B0ubS>T1UtiMgw<}!Q08|Olu>EMK$!$)o%Uipew4BO=_5=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$^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>XU!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)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$mzPLhz{6@sA6lowtg#sgj8?#OI zxFV4}h&LYMidI`Gl7us~NG8Cd1xtoK;RsQD$F{^MJ}#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 zMWvVxpsGt{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<4OSTMFX|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^mnRNU^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@kj6KL+`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-@ z%S@qhs25$~Uy$IUvJ1vqNpMNAidK;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>-ef0T=uB7tI{Gh$y0_;MbO}ufL@iVtTS6~QHLxCk-&5c&0ZNb8E z(xDaQ5{fDXn8k%_LncFf0Wwv|J~}s=_IS@Eg$~6IO-mFHR~Y2|vZ={KI5z49EitOb zE&V1Yy73gcU?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+^Leld&~ujeUaolsfHE4xA?TL4(BCg#Il)))4Rb4aH6o6V>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%8ZTJ(G_5NGZwmiHNr+!BuhBk1aX(RP z;txa7XWHCx3m{&}!pi55lZ*%FF@Q-aVSba5BqUxoIkY(Kv@Hf>o`Djh9 z_Gzr9N_U5kPnGz_H-%;upD+Dad^^4j1iiRbpJR^*0YBKFUoKI-t9%A$)#-99L{Bj}{fZ@{?0ZGAkyD@(?(=DjKRbDmCO57au-s&^r3W zp&eOx4IqnRvku{mM>fJyF``lwkJi~&BURC@fMx^Q(<8lrbxGmwfLqmJ>BpI3M^PwO zI$JWM4I*jShaiJ0m8dWa~K%Sp{3>1nTmPZ3&U%j7R!C)%N+2{d6P$yMu1KE;|{TgxQbRZ5?uK*5@;#8$wHTKs5n{-oTC4o{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_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>$Aj zXql!`YE{@=g21TxpZKssD=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%CGxKp$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{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=-%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$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%KB)$%;sd5JFMp2n2{mv-7uYra z2tZX>Bq{DxCGK$3KqgRMMx1;$=7mur5IjaeF2h^u;+#tOtf?L$>f=uyL5mknK5hIN;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>fOcJJ-ehs%roFyzMiV;M1>C0sGOZbwMRhpJ#9m{0Pf&!_U0#N$pllb)>E8sp% zRy4Kld6XR+>GiG^5TfwYfOKkD>Inp6fjOp#5}A0_EMA`|%2X=t{Y9ver;1PN`jba* zv`SHEbH826m7{lUiP%)!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* zjg`)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% zs3US=vD2pPyNP7-UYTBDf2@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&-l@w!=Cpy^vvRqXNd}N3U`boQNgrer>c!A%JobTl{)g&u%n19Eop-(o?r=YYH9(e zR1GKGficTOKBO@E%MvZ;`PyDlZGeHOOyKlABvXRq}z1s$@b~66?my4Ksyt<0B+el`!Xa z;!Yv66cK%HQxBTY6`V2MvL2!bUWy7^N^@=FUX^Yw*Ev}TJin94iN8ZIv=85K3 zgQZI2rLqn_zu$8l0(uzEZ!l}O!!(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-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)$sCL(G?Tof5{ z>iBPCFYtWbR0A0WmQK!Y{d!J{@_lnWpM* zc|h>%KKgfMiCCkWoo{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 zJZu8(@JGSXUv5AG4jKHQ1Y)*|53?Am#fSd+p;Td-^BKT=1@lW<$ zWSw^lANdtW1uUZK(uC!Ty3CvL)2N^*lLEV2p*C>mb+M({@KIV_y#k@i zZBfMtrQU^~qC5!IQsdNFpvzOE%X1e-rG`|cu3p8umNq%-x^%QQ4H7JlV?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%^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``%kV?ky_!xS>DW9s-v!2$J8-yz0^*&PgH7GOsFuG z)uGZ*+mbT@u&=eOKP~w*sM_P%+miwDrs}+M8}mmI0wQ(&s_^zt)a zojL2=8a3PGO{x0LM)8iNe#g`$VyUl7u~DME+N#tpabAZ?PWY?1sV=D0p8D6G{nyBU z)iF%%0t)R>SxyawLGaO{{G6h$8v=HuK)=~6Ozi8u!aXNu%RU#iZk z)SmI@F_jgel2b0B4wZ(+uzUEgD1fQm8E1rKNjNBt_Um5!<5!)oi$=f=!ZGVCOzptr zq`=X@G&D}D&f#c;YPH*$wq&MuDQ)zGHzoJ<0I#groYTTIf&%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&WjnP zSxBl=LpUQOHS%APEJ8)BQc=YEmO<+V|M?@9+SC2Im;eVMU<$vo_POm5aHw~qnipai%xqNZ?uqlG(rBAm>ee=}Esgdwb~l^(X^8<7!<2SfI-})` z-I}w~tiN!sQ9GB3s9^0}qkOKvf^Mpa?&P!~b@3r~F^^Tl-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{*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_0mZQ1o6oi5?xVY$(zOCO{&L zIy6MmQc-W82$5A^pnZ`ROodEfqjhlMIfDWhwi|(ff0MZWR=X-pgN+Di zL}VHiXgonD1^PXS?RK)hL07vXq#_DT-DW8vF-Yk_cFo?oO>`8sl#Z#^LqCgEtffLuT``%nfKjzZL(6R%VALx|uU8Uc zFGcuLQTX=ws$Tpz4gn%{@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&7XCi;H^HNb?{u>u>-V$=& zOQy??tiMnMLeeSXp3i;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!#?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$w#nk7?!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^+k2sF5TzsV*^;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*^{i6sP4^9hv`XAFu46 z%j41xqLaAQ7X;-2cS67srmybsR~r5$`ETd+Gg>RPivx61`Ov|NSy}!o4T^WBM$-PZ zG5?i<+6}y}00HYLaGX!DG&n3vfu%0djufaePE~ShSDhHxF%~Kn5no3GEr|{{mO9sk5dU@aDnh^!Lv3^jcDIBf1)hb0vc|Ad z3Ou`4G>bvqTeT5;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&=e+z^S}?J@ z21JDnM0>HI_QH{J9va0U(6hD^pXoRR%u?VD0ndnl3;Zzz+zI_uBuI9oz!4T8rx{EF zklggfg@tvugq;z9Bm-SK2redb`LNjfk%MFpi`Cz}Ndb04>9`bJ(|9Tb1xemKm zBmWJ`{%cpmYD|H=0t9R{1hybxqc8X_M?mC1iGUTMVC@umW%RQp1&oZuOB7T9zPILspX>S&hMLk_>Ir zkF~xH~Jtyh<%z9^z>iJFU<=&8psSg)C%zn8v*~1>FK%MZ3uYAq~N;^0S*33A)wO`c=jmxofyD6QsBj*&j=fs z1i`F1(3lOCe!i&sEyYS;%kT3qzK=Dw4CI+5O>EskP_m#C1g9WAn17>#OE9;`z=i%H}^r zz&%*MwxK{Z7|uqYEcfih09N4%l^`g0#cCT^ihItBK1CoXSKxU;kRH99QU)z@owM({ z>5RCujk&AB-I+E1RY+T9McykkPOpjox}^A3NS;eT__^-M^&xpwPOQgV!9e$$#BtPP;_7 z8!8V@o6S%JeARK?5O6;T=mfzm0?zQaG#dfC1b%gKfEJ~KUK8}RP+)gAsMGo-xhD%f zl6yS%<91J|1VQ|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)!9JriZ5E6b>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>D^wEMLI(MCYyANEDSUnVXm0wVvFBH(6z&$(6j_%>smol~IG``K>v8izX-6gUn9 zt7qn|pMD0Lbd$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=~;j1n4-XI0-ezoua?QVXp7gSfFL`7ltVKfj67N7%8|p97(o2j3k0W* z{8!C4n}u*)2gy?VNB{s)AxT6*RQz2K-&{2RZ4`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~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?)|iskn2Q~ME(T&CG4qc;VlgvO~s4LP?CZoi31MhA1oDy=qQ1 zd;LnOm=ZUY<(+T0XOJ+=JHKfySt|&wkf=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?v5!Acz8kme_bn;zgQF88IX$#iSd(~hvb>&u!*y;6Id zRI47O^v>{oZ!QEcm6wTXluppdoSV~(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>#V%Ow^&_RiB*({O{u%PAI-fgi2nNyI^xw@cxSY8btfI zkWwgh80{MQ(=Fa?@In4lD}_!w%U@^r2hZP@CNCD~OJtskj!SQdGu-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$j2ysFi& zvldr64^cq8wR(K9$_k!VL}`OSDj0bhehj7H@u46Acwh?YXhn*ZSo*DTqQU>fg1=0< zg|>O{-vPxl$6=tI*4G3P)+J^a3RFtWd{#G2&Gy}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&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?iWH0DH<`+%cI{?h$Rk_(8cL@)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^(tN7MGJdbnFtM+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&NY7p5_i67+ zR>yjLp9W7gnA>H{8I8Y~REdzQNa$h*iih*Se7xw95#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;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>`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#)}w7>M%h^n~RkTWsKU~8=XlX z{Vhz*sZ14u$Rl~siJLiOl07eQ717>8sA$Usntwb;V?aGG?w_@a-JTzPRFudKF;R96 zpnqp8UY)eO`iVH@NHNf)ro2W8aK5gC?yZ`)$b+ zl9q8A69|^CoE`P7n@|X?$^wpR>xxFoefcv?$zlEEmAC%#ti7-Pu51Kb`+$AV1jmPA z1=Bj=q{R#Li~GLfcY664`{MqYf^Sn^Ejf) zq-o8EzRVD-W6du*Jk48z#38GlQ=YyYCU|>M(D*QvLtH93Jen2Q~XOg z)3+Znk6+O}|FW%y75&D7K0ZGvehAy;+re=c={ass^c-gMjYuh`{ZWjiBC z$Y<}T|C>_KtX3pxB$9G;vsX|-hBZj~dvS9@$BITc4GSk0fFH5U+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*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|270wPvMQ=}B@kq~M_{X0C14P&`WAU5Jk)810+7~-Evh21mmS5DZ@A_)Ad5FQ&K*3==*Lf=V*>n$=7c^OLzxNR`IW9X^1)yhRVne+yWRCDnBP zT|q8ahypkKP?Btc;8g?Cd3M;q zS*_zh_7p0x-eTig0kV7yMJk6rd5RCBHh1UM`_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#of%}h4zm@&ZLI`NA1WoEEW!T74E8jr7@C-kZu=Qpp$WYp^6J;9jXPAu+7(wSbglZNY6%kHQJMBzO>A{vMS1RSaBR@waSthK80A zY(Xq;$#tqcNnVlPN9z>W2D+wNP4k23_4hS7|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`H9CxFOA{_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-QAe7KvG#aRi961#XkHdo>)+oce;mSS*x8re+-~0sYNmgTA(bQ` zfD}tEG@;iAQ33bhPev@84CGT%%p%e+1a*4$1jpHXiiRs$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>2T8M7VQEUcoO!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#eG?^@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^J_s+eI z$7+$iW@iuG^m8n@mfvk5k`Eq&GsA|o^}yQA-1L`Yus<3<#ancO$aj; zjgr>G5*UA4dh(p~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@TXD4xdGdEt5GVW9Mj|ROauHY7zr}f0P(;b;q2YJ&t`uvFP7UE zvZ`eCfw&iW^L?Yq6J^rt`?n#LpR7a3cN)p0pdsAmRRNL_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-VNcVkCc93{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 zFzoeUy72qix 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)czVR7TwCrrRuCi^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!Q3WZ96KJ|^pF zQiyZu8n_}dn5`&2k`GIJLPAmuiaavZoF!v45e*m}Bjo+r| zUMFf)DaL~(RP4VTp63kUm+>>E#-{$K;?bl6w7CXH;G_b=WFBQc#gVN;4&&vJldL@s zjbOYh2*=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|Gd?s+R+8o;#T51}oO?9&yrTXNQx2 zl^loKfV6UDeGH@Y^!4-@(Y-6hA%&@+l@ia(c~dkODXT)Nh(1p^ zz1yD@s~Hyi`z`X%w-ociY0$?@N)eO5P%q3lwe5`58kmREWd^e3Ul#k5J?@RieYO{6w43VQpaf?CWh zdMHh}UBcMO($y-Q!VyWkA;}xS^8@rNU!7HFoay1Up71eK&?AIIlNxK1W3TDq=-Xe6 zRXteCgkPgbnOq9=05N>ba1|PDJ5x8z-vIIdf;l-AU zOvzLCsLtpi6&%YuqPb6@l?Z8CjqQdJ$;pBGl_MPj#Q+aa$%Zb&d|}adA`^)nF>B&F zrh?b;&4CQ01jXUL4)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?rR zyt3+BuEedtZnZVMr;!RqqDv!Jg4Xi9CYUxhw-U11OS~xr%f{7auIF8<<{J+n@Ee}PC{!}gC*^@qmaIx57=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}^_;4e-lh_-{yvr ztlFvC^AT$i6ui6w4)N^D7bDExk#mTFZNf~ep{>p*WlL%ld}%R@vPCXL9AU4P=VG%f5|hfi`z*216%61BO%5l`p4dSZlKaNXGqOJmX_J41-> zP0}CpPdXIIn|ixDiGN)qj_KrbtF;s)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@tUB#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@?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-{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|9WdyRDx$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=b zZHnA&xyMj`4WU~P_zB_MnVy%70@cO@U`~vU3TKy~uy!k|3nz}wr@?wF8OpP~r<}nO zDhp{v0vJ)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>1@=}!s^T=^4B#y*iTICklO6r;~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}K6Bj4f(!&<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>0nuWBSLyF}*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#fWdm7IoB@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$JXFbr=ETI&?@q#rOaBjB2~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=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{tu{}uGS@?fpNV&SlC zp*rc3t9^PLj}THyT(q~zYC+*zwNQ8{seu+vBBSLV=WErX(k3~aqzmV-f8A=ZAGj`! z@Geu-M@UH@MwLyfT-cC+oORM1Pvg$E7bS0V3yNT#?QH z*;62H-Eyz>|7U97IkCUn9MRX$7B0>_-g_AQhg;dkCRVyEf@C3Cd-}op7z_}D>lM#Q2x8#%pzFBM=D^XAN{hd?i0i+qu|U6@LJ(-ZuN4*Qc4dEkz{8Oa`RamDKr z$PeTD@ zNkHSmGIJ^@`qB6gqJT!YFlH0+(Y6s`vK}OQ}Il@Ql8c^n` z0N*(f`ElK(*C#NwHjxZXNW-@$Us3dMoX|pRUD+}4B+qbY&iwlBt5w&^o5Oqtb{0Y2 ztr7TNHCm1)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{&1rwZO9ISXq!kEB6JOh?-?{(eL zAfU!7c-O0?oNH?8Vq8<4TmPjJQh^w1U76if^Xx{g)068TOvE@h*yF6gH|&gngJ!

Ye3Dp&pT#fKhgZwh2;5&BcNvGxU11w8&yd! zurGa1f4oP*w@$v5lRC)qlyEVyL>(w!KUPy>e<@fk2@I;Mz z>eYAyWHbE2_jJ}j3yMyw7CWtw$ZE@nwC%Clq3eIwX428u)dz$*AqG@+{;x~D=Rk1w zCbg6)BZTltk;~YMw>4H6Gj*LWW@d@AbWe2B6olz-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*HmJvgJY66=F|;VW)WdipW3!l$^IWS(T+6!2IG1@xd^Dp|K&JFDF+^- z;wIV&^A<4g{A0|gAb&^Xs*jxGsN+Bm)WHf;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#?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^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`0SO8HJH~1)DA5JY9ZV8NyLNU z>)(gBQZRbY+qN*I9FfxX4yy*ZlPW(Gbkr_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$;(2G1+-}C)T^wGWp4K#Vo${`Alj-FU4DITLA*bB#q1iL(a zSe6BBWV2)7VmYtml62fq9z(E?px}~W@Q%IN>X^R_5x3xn=P4ev#}`S1UX3D4 z*?iKJJ>JY>F^5ZiZNze+6hz?FnOczN@&Nr#F`Fi41KO+5%~Ik!_KaS4CI^ON?&m5k z+(t1``*B%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;-GG@7n##-6%NA9JV4?xCz5dSKm4~nqc~{t^~;2d1ga}iZd%Uo0P+wHvV6Pu$71h zYZ_`xoRR}IV%G<2cfl@Q=Q}W__mQWf*0458>$1{$jZ7j4HkJ{#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<}awMn#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?YwNT^vI!P9L4($aTnphvB&CM6s9Jd%i5TTm1jk(QuKMNkJb3G#;%Lykq%BGttTH zWag}QDS{49)~q^U5W^_Qxa-{~$?(_Q1?35m^BQJyE?D(Cs^lS>4@luBvJL zaky!H<pv1@3(CSK#^ z^C8YVeR>|Rk6f(N&6>5$!KI={`F~sS`{mcx)RggoSXe)e0LV{I(*t0OPvSM6nbP0l+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)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-#iK;dp{^ zmbpopMln%1s^636Imvnjz}%$0#$PCg`b%;`laUt_yY=C{`^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 z0eRspUE9E@qih`WBy($j1?Ej!EfVGYyTVzAL6tjLY+#&*u|onMU!>oLw#H zea7oF@CPXZ+rj%U^-d9^X26YeL}9qs@$$qK;Lzv!haUgZSC9}6d!B#j@h`oG2&;W} zpY!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|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvNM%EvD5VXdRdz`)$&>EaktaqI1!gTAjFMA|M| zPptOfeiLC`8^{`(D!ko6cxB=ZhCZbw3ORo(&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